package com.example.clients;


import com.example.pojo.Bars;
import com.example.pojo.Users;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

@FeignClient(name = "bars-server", url = "http://localhost:8082")
public interface BarsClient {

    @GetMapping("/bars/getAllBars")
    List<Bars> getAllBars();

    @GetMapping("/bars/ok")
    String ok();

    @RequestMapping("/bars/getUser")
    List<Users> getUser(@RequestParam("uid") String uid);

    @GetMapping("/bars/StatusChange")
    void StatusChange(@RequestParam("bid") int bid,@RequestParam("status") int status);

    @GetMapping("/bars/getFindBars")
    List<Bars> getFindBars(@RequestParam("select") String select,@RequestParam("input") String input);

    @GetMapping("/bars/findBar")
    List<Bars> FindBar(@RequestParam("tid") Integer tid);

    @GetMapping("/bars/getAllBarsByBid")
    List<Bars> getAllBarsByBid(@RequestParam("bid") Integer bid);

    @GetMapping("/bars/userFindBar")
    List<Bars> userFindBar(@RequestParam("uid") Integer uid);

    @GetMapping("/bars/getBarsCenter")
    List<Bars> getBarsCenter(@RequestParam("uid") Integer uid);

    @GetMapping("/bars/getAllApply")
    List<Bars> getAllApply(@RequestParam("bid") Integer bid);

    @GetMapping("/bars/getMyBars")
    List<Bars> getMyBars(@RequestParam("uid") Integer uid);

    @GetMapping("/bars/addBars")
    void addBars(@RequestParam("uid") Integer uid,@RequestParam("bname") String bname,@RequestParam("tid") Integer tid,@RequestParam("bimage") String bimage);

    @GetMapping("/bars/delOtherid")
    void delOtherid(@RequestParam("uid") Integer uid,@RequestParam("bid") Integer bid);

    @GetMapping("/bars/updateBarsApply")
    void updateBarApply(@RequestParam("uid") Integer uid,@RequestParam("bid") Integer bid,@RequestParam("otherid") String otherid);
}
